package com.sky.controller.user;

import com.sky.result.Result;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 2230823078_淡嘉浩
 * @Date 2025/3/8 下午10:37
 * Please don't copy!
 */
@RestController("UserShopController")
@RequestMapping("/user/shop")
@Api(tags = "店铺相关接口")
@Slf4j
public class ShopController {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    @RequestMapping("/status")
    public Result getStatus() {
        String status = stringRedisTemplate.opsForValue().get("SHOP:STATUS");
        log.info("获取到店铺状态为{}", status);
        Integer status1 = Integer.valueOf(status);
        return Result.success(status1);
    }
}
